<? session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<SCRIPT LANGUAGE="JavaScript">

function chkData(text){ 
tmp =document.all.item("text").value;
if (tmp != "")
searchpro.submit();
else {
alert("Enter Name");
document.all.item("text").focus();
searchpro.submit(); 
}
}
</SCRIPT>
</head>

<body>
<div id="Layer26">
        <p class="style30">ระบบจัดการข้อมูลเบื้องต้น</p>
        <hr />
  <table width="800" height="58" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="39" colspan="4">
        <p>&nbsp;</p></td>
    </tr>
  </table>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
<div id="Layer33">
  <table width="600" height="94" border="1" cellpadding="5" cellspacing="0" bordercolor="#999999">
    <tr>
      <td width="250" height="40" bgcolor="#0099CC"><div align="center" class="style29">ชื่อผลงาน</div></td>
      <td width="100" bgcolor="#0099CC"><div align="center" class="style29">ประเภทผลงาน</div></td>
      <td width="50" bgcolor="#0099CC"><div align="center" class="style29">สถานะ</div></td>
      <td width="75" bgcolor="#0099CC"><div align="center" class="style29">แก้ไขข้อมูล</div></td>
      <td width="60" bgcolor="#0099CC"><div align="center" class="style29">
        <div align="center">ลบข้อมูล</div>
      </div></td>
    </tr>
<? require("../connectDB.php");    //include "connectdb.inc";

$tmp="select * from project where user_id='".$_SESSION["ses_id"]."' order by project_id;";

//echo($tmp);
$sql = mysql_query($tmp);
while($result = mysql_fetch_array($sql))    { ?>
<TR>
<TD><? echo $result["project_name"]; ?></TD>
<td align="center"><? echo $result["project_type"]; ?></td>
<td><? echo $result["project_status"];?></td>
<TD align="center"> <a href="editProjectStudent.php?id=<? echo $result["project_id"]; ?>" >แก้ไข</TD>
<TD align="center"> <a href="deleteProjectStudent.php?id=<? echo $result["project_id"]; ?>" >ลบ</TD>
</tr>
<? }
mysql_free_result($sql);
mysql_close($con); ?>
</table>
</body>
</html>
